export const PARAMS_CONTRACT_TEMP = [
     {
        type: "a-input",
        field: "name",
        title: "合同模板名称",
        value: "",
        props: {placeholder:"请输入合同模板名称"}
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
   /*  {
      type:'a-button',
      field:'add',
      props:{
          type:'danger',
          icon:"plus"
      },
      children:['新增'],
      emit: ['click'],
      emitPrefix: 'btn-add',
    } */
]
export const FORM_CONTRACT_TEMP = [
    {
        type: "a-input",
        field: "name",
        title: "合同模板名称",
        value: "",
        props: { placeholder: "请输入合同模板名称"},
        validate: [
            { required: true, message: "请输入合同模板名称", trigger: "blur" }
        ]
    },
    {
        type: "a-input",
        field: "type",
        title: "合同类型名称",
        value: "",
        props: { placeholder: "请输入合同类型名称"},
        validate: [
            { required: true, message: "请输入合同类型名称", trigger: "blur" }
        ]
    },
     {
        type: "select",
        field: "parkIds",
        title: "关联园区（支持多选）",
        value: [],
        options:[],
        props: {mode: 'multiple',autoClearSearchValue:true,showSearch:true,allowClear:true,placeholder: "请选择园区"},
        validate: [
            { required: true, message: "请选择园区", trigger: "change" }
        ]
    },
    {
        type: "radio",
        field: "status",
        title: "启/禁状态",
         value: 1,
        options:[{value:1,label:'启用'},{value:2,label:'禁用'}],
    },
    {
        type: "a-input",
        field: "fileUrl",
        title: "附件（支持pdf、文件大小20M）",
        value: "",
        props: { disabled:true,placeholder:"请上传附件"},
        children: [
            {
                type:'a-button',
                props:{
                    type:'primary',
                },
                children:['选择文件'],
                slot:'suffix',
                emit: ['click'],
                emitPrefix: 'btn-file'
            }
        ]
    }
]

export const COLUMNS_CONTRACT_TEMP = [
    {
        title: '合同模板名称',
        dataIndex: 'name'
    },
    {
        title: '合同类型',
        dataIndex: 'type'
    },
     {
        title: '关联园区',
        dataIndex: 'parkName'
    },
    {
        title: '合同文件',
        dataIndex: 'fileUrl',
        scopedSlots: { customRender: 'fileUrl' }
    },
    {
        title: '状态',
        dataIndex: 'status',
        /* customRender: (text, row, index) => {
            if (row.status === 1) {
                return '启用'
            } else if (row.status === 2){
                return '禁用'
            }
            return ''
        }, */
        scopedSlots: { customRender: 'status' }
    },
     {
        title: '创建时间',
        dataIndex: 'createdTime',
    },
      {
        title: '操作',
        dataIndex: 'action',
        scopedSlots: { customRender: 'action' }
    }
]

export const PARAMS_PARK_RANGE = [
     {
        type: "a-input",
        field: "name",
        title: "园区名称",
        value: "",
        props: {placeholder:"请输入园区名称"}
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    }
]



export const COLUMNS_PARK_RANGE = [
    {
        title: '园区名称',
        dataIndex: 'name'
    },
    {
        title: '经营范围',
        dataIndex: 'managementAreas',
         scopedSlots: { customRender: 'managementAreas' }
    },
    {
        title: '创建日期',
        dataIndex: 'createdTime',
    },
    {
        title: '备注',
        dataIndex: 'remark',
    },
    {
        title: '操作',
        dataIndex: 'action',
        width: '180px',
        scopedSlots: { customRender: 'action' }
    }
]

export const PARAMS_TASK_CONFIG = [
     {
        type: "a-input",
        field: "fieldName",
        title: "任务名称",
        value: "",
        props: { placeholder: "请输入任务名称" }
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
    
]

export const FORM_TASK_CONFIG = [
    {
        type: "a-input",
        field: "fieldName",
        title: "字段名称",
        value: "",
        props: { placeholder: "请输入字段名称" },
        validate: [
            { required: true, message: "请输入字段名称", trigger: "blur" }
        ]
    },
    {
        type: "select",
        field: "fieldType",
        title: "字段类型",
        value: "",
        options:[{value:1,label:'文本'},{value:2,label:'下拉框'},{value:3,label:'文本区间数字'},{value:4,label:'日期'}],
        props: { placeholder: "请选择字段类型" },
        validate: [
            { required: true, message: "请选择字段类型", trigger: "change" }
        ]
    },
    {
        type: "a-input",
        field: "fieldCode",
        title: "字段编码",
        value: "",
        props: { placeholder: "请输入字段编码" },
        validate: [
            { required: true, message: "请输入字段编码", trigger: "blur" }
        ]
    }
]

export const COLUMNS_TASK_CONFIG = [
     {
        title: '任务名称',
        dataIndex: 'fieldName'
    },
    {
        title: '是否必填',
        dataIndex: 'required',
        customRender: (text, row, index) => {
            if (row.required === 1) {
                return '是'
            } else if (row.required === 2){
                return '否'
            }
            return ''
        },
    },
    {
        title: '类型',
        dataIndex: 'fieldType',
        customRender: (text, row, index) => {
            if (row.fieldType === 1) {
                return '文本'
            } else if (row.fieldType === 2){
                return '下拉选择框'
            }else if (row.fieldType === 3){
                return '区间数字'
            }else if (row.fieldType === 4){
                return '日期'
            }
            return ''
        },
    },
    {
        title: '状态',
        dataIndex: 'status',
        customRender: (text, row, index) => {
            if (row.status === 1) {
                return '启用'
            } else if (row.status === 2){
                return '禁用'
            }else{
                return '--'
            }
        },
    },
    {
        title: '备注',
        dataIndex:'description'
    },
    {
        title: '操作',
        dataIndex: 'action',
        width: '180px',
        scopedSlots: { customRender: 'action' }
    }
]

export const PARAMS_SERVICE_FEE = [
     {
        type: "a-input",
        field: "enterpriseName",
        title: "企业名称",
        value: "",
        props: {placeholder:"请输入企业名称"}
    },
     {
        type: "a-input",
        field: "parkName",
        title: "园区名称",
        value: "",
        props: {placeholder:"请输入园区名称"}
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
    
]
export const SERVICE_FEE_DATA = [
    {value:'1',label:'企业配置信息'},
    {value:'2',label:'关联关系信息'},
]
export const FORM_SERVICE_FEE = [
     {
        type: "select",
        field: "enterpriseId",
        title: "企业名称（支持模糊搜索）",
        value: "",
        options:[],
        props: { placeholder: "请选择企业"},
        validate: [
            { required: true, message: "请选择企业", trigger: "change" }
        ]
    },
    {
        type: "InputNumber",
        field: "aliPayAmountBiggestLimit",
        title: "支付宝单人单月限额（¥）（最大上线10万）",
        value: "",
        props: { placeholder: "请输入支付宝单人单月限额",min:1,max:100000,style:'width:100%',precision:2},
        validate: [
            { required: true, message: "请输入支付宝单人单月限额", trigger: "blur" }
        ]
    },
    {
        type: "InputNumber",
        field: "cmbAmountBiggestLimit",
        title: "招商银行单人单月限额（¥）（最大上线10万）",
        value: "",
        props: { placeholder: "请输入招商银行单人单月限额",min:1,max:100000,style:'width:100%',precision:2},
        validate: [
            { required: true, message: "请输入招商银行单人单月限额", trigger: "blur" }
        ]
    },
    {
        type: "InputNumber",
        field: "vatRatio",
        title: "税点%（保留4位小数）",
        value: "",
        props: { placeholder: "请输入税点",min:0,max:100,style:'width:100%',precision:4},
        validate: [
            { required: true, message: "请输入税点", trigger: "blur" }
        ]
    },
    {
        type: "InputNumber",
        field: "platformRatio",
        title: "平台手续费比例%（保留4位小数）",
        value: "",
        props: { placeholder: "请输入平台手续费比例",min:0,max:100,style:'width:100%',precision:4},
        validate: [
            { required: true, message: "请输入平台手续费比例", trigger: "blur" }
        ]
    },
    {
        type: 'radio',
        field: 'ageLimit',
        title: "是否限制65岁以上发放",
        value: '',
        options: [{ value: 1, label: '允许' }, { value: 2, label: '不允许' }],
        validate: [
            { required: true, message: "请选择是否限制发放", trigger: "blur" }
        ],
    },
    {
        type: "radio",
        field: "signOrdering",
        title: "签约顺序",
        value: '',
        options: [{ value: 1, label: '前置签约' }, { value: 2, label: '后置签约' }],
        validate: [
            { required: true, message: "请选择签约顺序", trigger: "blur" }
        ],
        emit: ['change'],
        emitPrefix: 'btn-radio',
    },
    {
        type:'html',
        col: { span: 24},
        field:"customInfo",
        title: '',
        props: { style:'color:red'}
    },
    {
        type: "select",
        field: "personalSignModeNos",
        title: "个人可签约方式（支持多选）",
        value: [],
        options:[/* {value:1,label:'静默签（不发短信）'}, */{value:2,label:'短信签约'},{value:3,label:'小程序签约'},{value:4,label:'线下签约'}],
        props: { mode: 'multiple',placeholder: "请选择个人可签约方式"},
        validate: [
            { required: true, message: "请选择个人可签约方式", trigger: "change" }
        ]
    },
];
export const COLUMNS_SERVICE_FEE_COMPANY = [ 
     {
        title: '企业名称',
        dataIndex: 'enterpriseName'
    },
    {
        title: '支付宝单人单月最大限额',
        dataIndex: 'aliPayAmountBiggestLimit'
    },
    {
        title: '招商单人单月最大限额',
        dataIndex: 'cmbAmountBiggestLimit'
    },
    {
        title: '可签约方式',
        dataIndex: 'personalSignModes'
    },
    {
        title: '签约顺序',
        dataIndex: 'signOrdering',
        customRender: (text, row, index) => {
            if (row.signOrdering === 1) {
                return '前置签约'
            } else if (row.signOrdering === 2){
                return '后置签约'
            }
            return '--'
        },
    },
    {
        title: '税点',
        dataIndex: 'vatRatio',
    },
    {
        title: '手续费比例',
        dataIndex: 'platformRatio'
    },
    {
        title: '操作',
        dataIndex: 'action',
        width: '180px',
        scopedSlots: { customRender: 'action' }
    }
]
export const COLUMNS_SERVICE_FEE_RELATION = [
     {
        title: '企业名称',
        dataIndex: 'enterpriseName',
    },
    {
        title: '关联园区平台公司',
        dataIndex: 'parkName',
    },
    {
        title: '服务费比例',
        dataIndex: 'fees',
        scopedSlots: { customRender: 'fees' }
    },
     {
        title: '服务费计算方式',
        dataIndex: 'serviceFeeCalculateMode',
        customRender: (text, row, index) => {
            if (row.serviceFeeCalculateMode === 1) {
                return '正算'
            } else if (row.serviceFeeCalculateMode === 2){
                return '反算'
            }
            return ''
        },
    },
     {
        title: '服务费扣除方式',
        dataIndex: 'serviceFeeSettleMode',
        customRender: (text, row, index) => {
            if (row.serviceFeeSettleMode === 1) {
                return '线上支付'
            } else if (row.serviceFeeSettleMode === 2){
                return '线下支付'
            }
            return ''
        },
    },
     {
        title: '签约时间',
        dataIndex: 'signTime'
    },
     {
        title: '失效时间',
        dataIndex: 'invalidTime'
    },
    {
        title: '操作',
        dataIndex: 'action',
        width: '180px',
        scopedSlots: { customRender: 'action' }
    }
]

 export const OPTION_INLINE = {
    form: {layout: 'inline'},
    resetBtn: false,
    submitBtn: false
  }
  export const OPTION_BLOCK= {
    form: { layout: "vertical" },
    row:{gutter: 20},
    resetBtn: false,
    submitBtn: false
  }
 